package com.example.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 数据库源表
 * </p>
 *
 * @author baomidou
 * @since 2023-02-28
 */
@Getter
@Setter
@TableName("data_resource")
@ApiModel(value = "DataResource对象", description = "数据库源表")
public class DataResource implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("数据源名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("数据库类型")
    @TableField("type")
    private String type;

    @ApiModelProperty("数据库描述")
    @TableField("description")
    private String description;

    @ApiModelProperty("jdbc连接url")
    @TableField("url")
    private String url;

    @ApiModelProperty("驱动类名")
    @TableField("driver_class_name")
    private String driverClassName;

    @ApiModelProperty("应用状态 0：停用，1：未发布，2：已发布")
    @TableField("status")
    private Boolean status;

    @ApiModelProperty("逻辑删除字段 1未删除，0删除")
    @TableField("deleted")
    @TableLogic
    private Boolean deleted;

    @ApiModelProperty("用户名")
    @TableField("account")
    private String account;

    @ApiModelProperty("密码")
    @TableField("password")
    private String password;

    @ApiModelProperty("版本号")
    @TableField("version")
    @Version
    private Integer version;

    @ApiModelProperty("新建时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty("更新时间")
    @TableField("update_time")
    private Date updateTime;
}
